<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('【未下载管理】列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>下载人：</label>
                                <input type="text" name="cjr"/>
                            </li>
                            <!--<li>
                                <label>订阅日期：</label>
                                <input type="text" class="time-input" placeholder="请选择创建日期" name="createDate"/>
                            </li>-->
                           <!-- <li>
                                <label>更新人名称：</label>
                                <input type="text" name="updateName"/>
                            </li>
                            <li>
                                <label>更新日期：</label>
                                <input type="text" class="time-input" placeholder="请选择更新日期" name="updateDate"/>
                            </li>-->
                           <!-- <li>
                                <label>订阅编号 ：</label>
                                <input type="text" name="downNo"/>
                            </li>-->
                           <!-- <li>
                                <label>订阅编号：</label>
                                <input type="text" name="workNo"/>
                            </li>-->
                         <!--   <li>
                                <label>资源地址：</label>
                                <input type="text" name="resourcePath"/>
                            </li>-->
                          <!--  <li>
                                <label>http虚拟路径：</label>
                                <input type="text" name="virtualPath"/>
                            </li>-->
                           <!-- <li>
                                <label>下载人：</label>
                                <input type="text" name="userId"/>
                            </li>-->
                           <!-- <li>
                                <label>下载完成时间：</label>
                                <input type="text" class="time-input" placeholder="请选择下载完成时间" name="downEndDate"/>
                            </li>
                            <li>
                                <label>下载开始时间：</label>
                                <input type="text" class="time-input" placeholder="请选择下载开始时间" name="downBeginDate"/>
                            </li>-->
                           <!-- <li>
                                <label>组织ID：</label>
                                <input type="text" name="departId"/>
                            </li>-->
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:order:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:order:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:order:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>-->
                <!--<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:order:export">
                    <i class="fa fa-download"></i> 导出
                </a>-->
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:order:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:order:remove')}]];
        var prefix = ctx + "system/order";

        $(function() {
            var options = {
                url: prefix + "/wydxz",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "【请填写功能名称】",
                columns: [{
                    checkbox: true
                },
                    {
                        field: 'id',
                        title: 'id'
                    },
                    {
                        field: 'cp',
                        title: '产品'
                    },
                    {
                        field: 'path',
                        title: '路径'
                    },
                    {
                      field: 'cjr',
                      title: '下载人',
                        formatter: function(value, item, index) {
                            var s = atob(value)
                            s = escape(s);
                          return decodeURIComponent(s);
                        }
                    },
                    {
                        field: 'cjsj',
                        title: '下载时间'
                    },
                    {
                        field: 'zt',
                        title: '状态',
                        formatter: function(value, item, index) {
                            // console.log(item.down_end_date)
                            //if (item.down_end_date == null) {
                            if(value == "2"){
                                return '<span class="label label-primary">网页端下载</span>';
                            }else{
                                return '<span class="label label-warning">未知</span>';
                            }
                            //}
                            /* else{
                                 return '<span class="label label-primary">下载完成</span>';
                             }*/
                        }
                    }

              /*  {
                    field: 'createName',
                    title: '创建人名称'
                },

                {
                    field: 'updateName',
                    title: '更新人名称'
                },
                {
                    field: 'updateDate',
                    title: '更新日期'
                },
                {
                    field: 'downNo',
                    title: '下载单号'
                },

                {
                    field: 'resourcePath',
                    title: '资源地址'
                },

                {
                    field: 'virtualPath',
                    title: 'http虚拟路径'
                },*/



                /*{
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }*/]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>